<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<hdjs/>
	<link rel="stylesheet" href="__CONTROL_TPL__/Css/public.css" />
	<script type="text/javascript" src="__CONTROL_TPL__/Js/public.js"></script>	
</head>

<body>
	<table class="table">
		<tr>
			<td class="th" colspan="20">后台用户列表</td>
		</tr>
		<tr class="tableTop">
			<td class="tdLittle1">ID</td>
			<td>用户名</td>
			<td>昵称</td>
			<td>帐号状态</td>
			<td>锁定</td>
			<td>操作</td>
		</tr>
		<foreach from="$background" value="$value">
		<tr>
			<td>{$value.uid}</td>
			<td>{$value.username}</td>
			<td>{$value.nickname}</td>
			<if value="$value.is_lock eq 1">	
				<td>锁定</td>	
			<else/>
				<td>正常</td>
			</if>
			<td>
				<if value="$value.uid eq {$hd.session.adminid}">
					<span>不能锁定自己</span>
				<else/>
					<if value="$value.is_lock eq 1">
						<a href="{|U:'unlock_user',array('uid'=>$value['uid'])}">解锁</a>
					<else/>
						<if value="$value.supper eq 1">
							<span>超级管理员,不能被锁定</span>
						<else/>
							<a href="{|U:'lock_user',array('uid'=>$value['uid'])}">锁定</a>
						</if>
					</if>
				</if>
			</td>
			<td>
				<if value="$value.uid eq {$hd.session.adminid}">
					<span>不能删除自己</span>
				<else/>
					<if value="$value.supper eq 1">
						<span>超级管理员,不能被删除</span>
					<else/>
						<a href="javascript:" onclick="if(confirm('确定要删除吗？')) hd_ajax('{|U:'del_user',array('uid'=>$value['uid'])}')">删除</a>
					</if>
				</if>
			</td>	
		</tr>
		</foreach>
	</table>

</body>
</html>